using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class UI_Recipe: MonoBehaviour
{
    [SerializeField] private ItemData item;
    [SerializeField] private Image itemImage;
    [SerializeField] private TextMeshProUGUI itemName;

    private void OnValidate()
    {
        if (item != null)
        {
            itemImage.sprite = item.icon;
            itemName.text = item.itemName;
        }
    }

    public void PutRecipeIntoWorkBench()
    { 
        WorkBenchManager.instance.ShowRecipeDetail(item);
    }
}
